package academic.ui.client.presenter;



import academic.ui.client.event.NewGameEvent;
import academic.ui.client.place.Tokens;

import com.allen_sauer.gwt.log.client.Log;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.EventBus;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
import com.gwtplatform.mvp.client.annotations.ProxyStandard;
import com.gwtplatform.mvp.client.proxy.ProxyPlace;
import com.gwtplatform.mvp.client.proxy.RevealContentEvent;

public class GamePlacePresenter extends 
Presenter<GamePlacePresenter.MyView,GamePlacePresenter.MyProxy>{


	
	@Inject
	public GamePlacePresenter(EventBus eventBus, MyView view, MyProxy proxy) {
		super(eventBus, view, proxy);
	}
	
	

	@ProxyStandard
	@NameToken(Tokens.deals)
	public interface MyProxy extends ProxyPlace<GamePlacePresenter>  {}

	public interface MyView extends View {
				
	}

	@Override
	protected void revealInParent() {
		RevealContentEvent.fire(this, GamePresenter.slot,this);
		Log.debug("GamePlacePresenter revealInParent");
	}
	
	@Override
	public void onReveal() {
		super.onReveal();
		Log.debug("GamePlacePresenter onReveal");
		getEventBus().fireEvent(new NewGameEvent());
	}
	

	@Override
	public void onReset() {
		super.onReset();
		Log.debug("GamePlacePresenter onReset");
		
	}
	
	@Override
	public void onBind() {
		super.onBind();
		Log.debug("GamePlacePresenter onBind");
	}
	
	
}
